use std::sync::Arc;

use datafusion::arrow::array::{RecordBatch, UInt64Array};
use datafusion::arrow::datatypes::{Field, Schema};
use datafusion::arrow::datatypes::DataType::UInt64;

pub fn affect_rows_batch(rows: u64) -> RecordBatch {
    let schema = Schema::new(vec![Field::new("affect_rows", UInt64, false)]);
    let rows_col: UInt64Array = vec![Some(rows)].into();
    RecordBatch::try_new(Arc::new(schema), vec![Arc::new(rows_col)]).expect("affect_rows_batch ok")
}